package com.group01.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDate;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 业主
 * </p>
 *
 * @author xuxu
 * @since 2022-07-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ZyOwner extends Model<ZyOwner> {

    private static final long serialVersionUID=1L;

    /**
     * 业主id
     */
    @TableId(value = "owner_id", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long ownerId;

    /**
     * 昵称
     */
    private String ownerNickname;

    /**
     * 真实姓名
     */
    private String ownerRealName;

    /**
     * 性别unknow未知male男female女
     */
    private String ownerGender;

    /**
     * 年龄
     */
    private Integer ownerAge;

    /**
     * 身份证号码
     */
    private String ownerIdCard;

    /**
     * 手机号码
     */
    private String ownerPhoneNumber;

    /**
     * openid
     */
    private String ownerOpenId;

    /**
     * 微信号
     */
    private String ownerWechatId;

    /**
     * qq号码
     */
    private String ownerQqNumber;

    /**
     * 出生日期
     */

    private LocalDate ownerBirthday;

    /**
     * 头像
     */
    private String ownerPortrait;

    /**
     * 个性签名
     */
    private String ownerSignature;

    /**
     * 禁用状态enable启用-disable禁用
     */
    private String ownerStatus;

    /**
     * 注册方式（weChat微信-app-web）
     */
    private String ownerLogonMode;

    /**
     * 业主类型
     */
    private String ownerType;

    /**
     * 密码
     */
    private String ownerPassword;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 备注
     */
    private String remark;


    @Override
    public Serializable pkVal() {
        return this.ownerId;
    }

}
